═══ 1. Introduction ═══ DoomEdit/PM is a 32-bit DOOM and DOOM2 map editor. It enables you to edit existing maps, to edit maps created by others, and to create your own maps from scratch. DoomEdit/PM (DEPM) is multi-threaded to take advantage of OS/2's preemptive multitasking; it was written for C Set++ version 2.1 to maximize performance and functionality. DOOM has become the most widely-played game in existence; in part, this is due to id's beginnings and continuing presence in the shareware market. No other game in history has inspired so many hacks, add-ons, cheats, and discussions. No other game vendor in history has been so open about the implementation of their game as id Software has been. If you are playing an illegal copy of DOOM or DOOM2, please register (or buy) it; I (and many others) want id to continue to make games like DOOM and to continue to allow us to mess with their products. ═══ 1.1. Using this Tutorial ═══ Parts of this Tutorial assume that you are not using it for reference, but to learn how to use DEPM. These sections will lead you through a number of activities intended to instruct. It is assumed that because you are using OS/2, you can be running DEPM while you are reading this tutorial. Black text indicates an activity for you to perform. If you are using this Tutorial as a reference, you should not perform the activities because any work you have done could get erased. I recommend that you go through the Tutorial before you start working on your own PWAD. ═══ 1.2. Copyrights ═══ OS/2 is a trademark of the IBM Corporation. DOOM and DOOM2 are trademarks of id Software. DoomEdit/PM and DragonWare are names made up by Gerald Callow so please don't steal them. Gerald Callow is a product of Mom and Dad. ═══ 2. Terminology ═══ This tutorial (and the DEPM online help) uses terminology that may be unfamiliar to you: Thing An object in the game "world". Vertex A point in two-dimensional space which defines the end-point of one or more two-dimensional lines. Linedef A two-dimensional line which connects exactly two (2) vertexes. Sidedef A plane into the third dimension along one side of a linedef. Sector A map area bounded by sidedefs. Sector Tag An arbitrary number used to assign linedef effects to sectors. Texture The game appearance of a floor, ceiling, or wall. Episode In DOOM, a grouping of nine (9) maps; in DOOM2 there is one episode only. Map A group of things, vertexes, linedefs, sidedefs and sectors which define a scenario for game play; also known as a "level". Extra A resource for sound, music, wall texturing, and so on. IWAD A large file containing all resources needed for basic play; distributed by id Software with the game. PWAD A smaller file which is used to "patch" the IWAD; can contain maps and/or extras. Node Builder A program which "compiles" a map into a form which the game engine uses while rendering the game "world". Compress a process by which duplicate sidedefs are removed from a PWAD to reduce its size. ═══ 2.1. Things ═══ A thing is an object (for example, a monster) that exists in the game world, but does not DEFINE the game world. Things do not have to be visible, and may not always appear. Examples of things are: monsters, teleport exits, weapons, ammo, decorations, player starting points, and bonus items. A thing has the following properties: Type What the thing is (teleport exit, monster, ammo, and so on). Angle The direction in which the object is facing when the map begins. This applies to monsters, player starts, and teleport exits. It is not important, for example, which way a shotgun is facing -- it will always look the same. Flags A number of on/off bits that determine the object's behavior and when it appears: Easy Thing appears in EASY mode (skill 0). Medium Thing appears in MEDIUM mode (skills 1 and 2). Hard Thing appears in HARD mode (skills 3 and 4). Deaf / Ambush Thing (monster only) does not react until it sees the player. If this bit is left off, the monster will react when it hears shots. Multi-Player Thing appears in multi-player (deathmatch or cooperative) mode ONLY. ═══ 2.2. Vertexes ═══ A vertex is a point in two dimensional space which defines the end-point of one or more two-dimensional linedefs. It has no attibutes other than its position on the map. ═══ 2.3. LineDefs ═══ A linedef is a two-dimensional line which connects exactly two (2) vertexes. Linedefs do not necessarily define walls (they CAN); they simply indicate a line along which the map makes a transition from one "area" to another. Linedefs travel from one vertex to another. This direction is very important because a linedef may have two sides: a right side and a left side. If you rotate the linedef so that it is pointing straight up (the from vertex is on the bottom), the right side is the right side of the line. Linedefs can be used to "trigger" events when the player crosses them, or pushes on them (switches, doors, lifts). Some linedefs trigger the sector on their left sides, some trigger a sector on neither side. A linedef which triggers an event in a sector other than the one on its left side must be defined with a sector tag which is used by the sector affected. For example, if linedef #231 causes sector #21 to raise, both must have the same sector tag (for example, "13"). More than one sector and more than one linedef can have the same sector tag. A linedef has the following properties: Type What the linedef does when activated. DEPM uses the following convention: TAR Description T indicates whether or not a sector tag is required; this will be "T" if a sector other than the one on the left side of the line is affected, or " " if the sector on the left side of the line will be affected. A indicates the activation type; this will be "W" if the linedef is activated when the player walks over it, "S" (switch) if the linedef is activated when the player pushes on it, or "G" (gun) if the linedef is activated when the player shoots it. R indicates whether the event can take place more than once; this will be "R" if the event is repeatable, or "1" if the event may take place once only (the single exception is "animated wall" which takes place all the time). Attributes A number of on/off bits that determine the linedef's properties: Impassable The player cannot cross this linedef. Monsters cannot pass Monsters cannot cross this linedef. Two Sided This linedef has two sides; monsters and players can move and shoot through this linedef. Upper texture unpegged When the ceiling of the sector adjacent to this linedef moves up, the upper texture will not move with it (used very rarely). Lower texture unpegged When the ceiling of the sector adjacent to this linedef moves up, the lower and normal textures will not move with it (used mainly for door tracks). Secret This linedef appears to be a normal wall on the automap (used mostly for secret doors). Sound dampening This linedef dampens sound. It takes two such linedefs to silence noise such that monsters will not react to it; this property is used only for two sided linedefs -- one sided linedefs are inherently soundproof. Invisible on map This linedef does not appear on the automap. Mapped at start This linedef appears on the automap at the start of the map. Sector Tag The arbitrary sector tag which is used by the sector(s) this linedef affects. Right Side The sidedef on the right side of the linedef. Left Side The sidedef on the left side of the linedef. ═══ 2.4. Sidedefs ═══ A sidedef can be thought of as a plane into the third dimension along one side of a linedef. It defines the appearance of its side of the linedef in the game "world". A sidedef has the following properties: X Offset The horizontal offset into the textures from the left. A positive offset "shifts" the texture to the LEFT; a negative offset "shifts" the texture to the RIGHT. Y Offset The vertical offset into the textures from the bottom. A positive offset "shifts" the texture UP; a negative offset "shifts" the texture DOWN. Sector The sector this sidedef is a part of. Normal Texture The texture rendered between the ceiling and the floor in the sector this sidedef is a part of. Lower Texture The texture rendered in the sector this sidedef is a part of, below the floor of the sidedef on the other side of the linedef. Upper Texture The texture rendered in the sector this sidedef is a part of, above the ceiling of the sidedef on the other side of the linedef. ═══ 2.5. Sectors ═══ A sector is an "area" on the map. It defines a region to which its properties apply. A sector is defined by the sidedefs which are parts of it. A sector has the following properties: Floor Height The height of the floor; this can range from -16384 to 16383. Floor Texture The texture rendered onto the floor of the sector. Note that floor textures are aligned on a 64-unit grid. Ceiling Height The height of the ceiling; this can range from -16384 to 16383, but must be greater than the floor height. Ceiling Texture The texture rendered onto the ceiling of the sector. Note that ceiling textures are aligned on a 64-unit grid. Light Level The brightness of the sector; this can range from 0 to 255. Sector Tag The arbitrary sector tag which is used by the linedef(s) which affect this sector. Effect A special effect which takes place in the sector. Light effects generally alternate between the light level of the sector and the light level of a neighbouring sector. ═══ 2.6. Sector Tags ═══ A sector tag is an arbitrary, usually unique number which is used to identify a link between sectors and the linedefs which affect them. More than one linedef can affect a sector; for example, one may start the floor moving, another may stop the effect (or, more than one may lower a lift). Likewise, more than one sector can be affected by a linedef; for example, a linedef may cause a number of pillars to lower into the floor. DEPM allows you to find the first free tag by using the "Locate" menu and selecting "Free Tag". ═══ 2.7. Textures ═══ A texture is the graphical appearance of a wall, floor or ceiling. Floor and ceiling textures are stored as simple 64 x 64 bit colour values, and the game engine aligns them on a 64 x 64 grid. Wall textures are composed of smaller "patches" of graphics information which are rendered at different points along the wall; some walls are composed of a single patch, some are composed of many. ═══ 2.8. Episodes ═══ In DOOM, an episode is a group of nine maps. There are three episodes. In DOOM2, there is one episode only. ═══ 2.9. Maps ═══ A map is a group of things, vertexes, linedefs, sidedefs and sectors which define a scenario for game play; it is also known as a "level". A map must contain at least two sectors, must have four player start things, must have at least four deathmatch start things, and must have some way to end the map. ═══ 2.10. Extras ═══ An extra is a resource stored in a PWAD to alter the game environment by changing sounds, music, wall patches, or sprites. DEPM does not allow the creation or editing of extras, but it will allow you to copy them from one PWAD to another, or to rename them (if you want to mess around with these, I recommend you get the unofficial DOOM specs). ═══ 2.11. IWADs ═══ The IWAD is a large file containing all resources needed for basic play; it is distributed by id Software with the game. For DOOM, this file is named DOOM.WAD; if you select this IWAD when DEPM starts up with a new profile, DEPM will run in DOOM mode. For DOOM2, this file is named DOOM2.WAD; if you select this IWAD when DEPM starts up with a new profile, DEPM will run in DOOM2 mode. ═══ 2.12. PWADs ═══ A PWAD is a smaller file which is used to "patch" the IWAD; it can contain maps and/or extras. DOOM PWADs will not work with DOOM2 and vice-versa; however, DEPM allows you to load either type of PWAD in either mode, and makes the necessary adjustments. DEPM does not change the contents of the PWAD, therefore changing a PWAD from one game to the other still requires you to modify the PWAD contents (textures, things, and extras). ═══ 2.13. Node Builder ═══ The Node Builder is a program which "compiles" a map into a form which the game engine uses while rendering the game "world". When you enter linedefs mode, DEPM clears the previously-built nodes from memory (this removes "additional" vertexes from the map -- they are not "linked" to any linedef and would be confusing if they appeared in the editor). This means that before the map can be saved, the node builder must be run again. When the map needs to be rebuilt, and it is safe to do so, DEPM starts up a separate thread to run the node builder. This allows you to continue working in things mode and sectors mode. An indicator appears to let you know that the node builder is running. The node builder partitions each sector into sub-sectors which are concave (that is, from any point within the sub-sector, you can see every point on every sidedef that defines it). This requires some sidedefs to be split; a binary tree is built which contains the sub-sectors and definitions of their positions in two-dimensional space. The node builder selects "partition lines" along which to split sectors into sub-sectors by weighing the number of splits needed against the tree's overall balance. You can change the weights assigned to avoiding splits and balancing the tree. ═══ 2.14. Compress ═══ Many linedefs may have sidedefs which are identical. It is possible to make these linedefs point to a single sidedef without affecting the way the game engine operates (in fact, it may improve performance since the PWAD is smaller). Compress is a process by which duplicates are removed to reduce size. If you select compress and load a PWAD, DEPM will search for linedefs which point to a single sidedef, and will decompress these. This allows you to edit as usual. If you select compress and save a PWAD, DEPM will search for linedefs which could point to a single sidedef, and will compress these. If you load a compressed PWAD without decompressing it, you must not enter linedefs mode because the node builder will build something that makes absolutely no sense to the game engine. If you don't know whether a PWAD is compressed, load it in with compression selected; if the level was not compressed, DEPM won't do anything to it. If you are going to use compression, I recommend you not compress while saving until your "final cut"; loading and saving is MUCH faster when compression is turned off. ═══ 3. Getting Started ═══ The first time you start up DEPM, you will have to tell it where your IWAD is. This IWAD may be DOOM.WAD or DOOM2.WAD. DEPM will detect which one it is. When DEPM is started with no parameters, it sets up the default profile (called "DoomEdPM") and stores the path to your IWAD in it. This profile also contains the preferences and the properties of the last saved thing, sidedef, sector, and PWAD. You can start up DOOMEDPM.EXE with a single parameter; this parameter is the name of a custom profile in DOOMEDPM.INI. You can use this to create different desktop program objects for DOOM and DOOM2 editor sessions. When you specify a profile which doesn't exist, you will have to tell it where your IWAD is; this information will be saved into the new profile. For example, to create a new profile named "Doom2" you would enter "DOOMEDPM Doom2". Please start up DEPM now and tell it where to find your IWAD (if you haven't done so already). ═══ 4. Editing a Map ═══ DEPM allows you to examine and/or edit maps from the IWAD, and optionally to save changed maps to a PWAD. The Title Bar displays the name of the PWAD currently being edited. At the moment, it should read "(untitled.wad)". This means that no PWAD is in memory at this time. Using the Edit Menu, select "Edit Map". The "Edit Map Selection" dialog will appear. The Edit Map menu item allows you to select a map to edit. Map entries which appear black are maps which are currently in memory (and in the current PWAD). Map entries which appear dark cyan are maps which are available in the IWAD. The default selection is always map 1. Press the "OK" button to enter Edit Mode. ═══ 4.1. The Editor Window ═══ The Editor Window is the group of controls on the left side of the DEPM window: ExMx / MAPxx The map control group is used to identify the map currently being edited, and to select the desired edit mode. There are three edit modes: Things In things mode, DEPM allows you to work with the things defined for the map. LineDefs In linedefs mode, DEPM allows you to work with the vertexes, linedefs, and sidedefs defined for the map. Sectors In sectors mode, DEPM allows you to work with the sectors defined for the map. Zoom The zoom spin button is used to change the scale at which the map is displayed. Press the up arrow to increase the magnification. Press the down arrow to decrease the magnification. Grid The grid zoom spin button is used to change the grid displayed on the map. Objects moved or added when a grid is displayed will "snap" to the grid. Press the up arrow to step through the available grids. The progression is 8, 16, 32, 64, 128, 256, 512, 1024, none. Press the down arrow to step through the available grids. The progression is 1024, 512, 256, 128, 64, 32, 16, 8, none. Tools The tools group contains a collection of tools used during editing, as well as the "nodes building" indicator. Thing Template This tool is used to add new things to the map. Vertex Template This tool is used to add new vertexes to the map. Sector Template This tool is used to add new sectors to the map. Rendering This indicator is used to let you know that DEPM is rendering the wall and floor textures into bitmaps. A separate thread performs this operation; you can still look at "unbitmapped" textures, it will just take longer for them to be displayed. Once a texture has been rendered into a bitmap, it appears much more quickly when selected. Nodes Building This indicator is used to let you know when the node builder is running. Press the LineDefs radio button to enter linedefs mode. Note that the map window to the right changes. Press the Things radio button to return to things mode. You will see the nodes building indicator show up: Shredder This tool is used to delete things, vertexes, linedefs, and sectors. Reporting Information will appear at the bottom of the Edit Window as the mouse pointer moves around in the Map Window; it indicates the mouse position and the feature the mouse is pointing at. ═══ 4.2. The Map Window ═══ The Map Window is the graphic window on the right side of the DEPM window. It displays a two-dimensional representation of the map. Depending on the mode the editor is in, different aspects of the map will be displayed. The two scroll bars can be used to scroll around the displayed map. The scroll bars support line scrolls, page scrolls, and real-time positioning by using the thumb tabs. When the thumb tab is used to scroll the map, only the two-dimensional map is displayed (without features present in the current editing mode) to allow real-time scrolling to take place with acceptable performance. Move the mouse pointer onto the thumb tab of the horizontal scroll bar, hold down the left mouse button, and try moving the thumb tab left and right. Notice that the things do not appear while the map is being moved. Performance depends on the amount of the map visible: zoom in to around 75% and try this again to see the difference. ═══ 4.2.1. Things Mode ═══ In things mode, the Map Window displays the two-dimensional map in dark cyan, and the things in a variety of colours depending on which category they fall into: Dark Green Player starts and teleporter exits. Dark Blue Red, blue and yellow keys. Light Red Monsters. Dark Grey Ammunition. Dark Red Bodies. Dark Pink Decorations. Light Pink Light sources. Light Green Medikits, Stimpacks, Soul Spheres, Blur Spheres, etc. Brown Weapons. Each thing is displayed as a circle with a line in it. The line indicates the direction in which the thing is facing. Move the mouse pointer onto one of the things on the map. Note that the editor window reports what the thing is. ═══ 4.2.2. Linedefs Mode ═══ With the zoom at around 75%, press the LineDefs radio button to enter linedefs mode. Note that the map window to the right changes. In linedefs mode, the Map Window displays the two-dimensional map as vertexes and linedefs. Linedefs are displayed in several colours to assist you in determining what type of linedef they are: Black This linedef has a right sidedef only. Grey This linedef has both a right and a left sidedef. Pink This linedef has a right sidedef only, and has some sort of effect defined for it. Green This linedef has both a right and a left sidedef, and has some sort of effect defined for it. Red This linedef has a left sidedef only; this is an error. When you point to a linedef which has a sector tag, sectors with the same tag will be highlighted in pink. Vertexes are displayed as small green circles. The right sides of linedefs are indicated by a "spike". Move the mouse pointer onto one of the lines on the map. Note that the editor window reports which linedef you are pointing to. Move the mouse pointer onto one of the green circles. Note that the editor window now reports that you are pointing at a vertex. DEPM correllates the mouse position against vertexes first; if a linedef is defined by two vertexes which are close together, you may have to zoom in a large amount, or move one of the vertexes before it will find the linedef. ═══ 4.2.3. Sectors Mode ═══ Zoom out to around 25%, and press the Sectors radio button to enter sectors mode. Note that the Map Window to the right changes. In sectors mode, the Map Window displays the two-dimensional map in dark cyan. When you move the mouse pointer into a sector, the lines defining the sector turn black. When you point to a sector which has a sector tag, linedefs with the same sector tag will be highlighted in red. Move the mouse pointer around the map to see how sector identification works. Note that for small sectors, you may have to zoom in quite a bit before DEPM will be able to see them. ═══ 4.3. Closing the Map ═══ When you have finished editing a map, you can close it to edit another map, or to perform other functions at a PWAD level. WARNING: if you enter linedefs mode and close the map without rebuilding it, you will not be able to play it (assuming you then save it). Using the Edit Menu, select "Close Map". The Editor and Map Windows will be dismissed. ═══ 5. Loading a PWAD ═══ To load a PWAD into memory, you can either open it, or import it. Open PWAD... When you open a PWAD, the PWAD in memory is cleared and the new PWAD is loaded in. Import PWAD... When you import a PWAD, the new PWAD is loaded and merged with the PWAD in memory. If there are conflicting maps or extras, you will be asked if you want to replace the one in memory with the one being imported. ═══ 5.1. Compression ═══ If you are not sure whether a PWAD has been compressed, it is a good idea to load it in with compression turned ON. Using the Preferences Menu, check "Compress". Using the File Menu, select "Open PWAD..." and select "DEPMTUTR.WAD". Once the load has completed, use the Preferences Menu to uncheck "Compress". ═══ 5.2. Altering Maps ═══ DEPM allows you to change which episode and map are patched by a PWAD. Using the Edit Menu, select "Alter ExMx...". Note that the first map is currently patched, and its radio button is selected. Press "OK". The selection dialog is displayed again. Press the second radio button and then hit "OK". Using the Edit Menu, select "Alter ExMx...". Note that the second map is currently patched, and the first radio button is selected. Press the second radio button, then press "OK". The selection dialog is displayed again, and the first radio button is selected. Press "OK". The map is now back in its original Episode 1, Map 1 slot. ═══ 5.3. Adding Things ═══ You can add things to a map in things mode. Using the Edit Menu, select "Edit Map". The "Edit Map Selection" dialog will appear. Press the "OK" button to enter Edit Mode. To add a new thing, move the mouse pointer onto the thing template: Press and hold down the right mouse button. The mouse pointer indicates that a thing has been "picked up": While holding the right mouse button down, move the mouse pointer onto the Map Window. Release the right mouse button. Note that a new thing has been added to the map. ═══ 5.4. Deleting Things ═══ You can delete things from a map in things mode. Move the mouse pointer onto the thing you just added, and check that the thing's type is displayed in the Edit Window. Now press and hold down the right mouse button. The mouse pointer indicates that a thing has been "picked up". While holding the right mouse button down, move the mouse pointer onto the Shredder Tool: Release the right mouse button. Note that the thing has been deleted from the map. ═══ 5.5. Moving Things ═══ You can move things around on a map in things mode. Move the mouse pointer onto a thing, and check that the thing's type is displayed in the Edit Window. Now press and hold down the right mouse button. The mouse pointer indicates that a thing has been "picked up". While holding the right mouse button down, move the mouse pointer to a different part of the map. Release the right mouse button. Note that the thing has been moved. ═══ 5.6. Cloning Things ═══ You can clone things on a map in things mode. Move the mouse pointer onto a thing, and check that the thing's type is displayed in the Edit Window. Hold down the CTRL key, then press and hold down the right mouse button. The mouse pointer indicates that a thing has been "picked up". While holding the right mouse button down, move the mouse pointer to a different part of the map. Release the right mouse button. Note that the thing has been cloned. ═══ 5.7. Editing Things ═══ You can change the properties of things on a map in things mode. Add a new thing. Move the mouse pointer onto the new thing, and check that the thing's type is displayed in the Edit Window. Now click the left mouse button. The Thing Properties dialog is displayed. The Thing Properties dialog allows you to change the thing's type, angle, and flags. Change the selected thing into a Deathmatch Start. ═══ 5.8. Checking Things ═══ You can verify that all necessary things exist on a map in things mode. From the Edit Menu, select "Check Map". You are told that there are less than 4 Deathmatch Starts. Press "OK". Add a new thing from the thing template. Because the last thing you saved was a Deathmatch Start, the new thing will be a Deathmatch Start as well. Clone the thing you just added. It too will be a Deathmatch Start. Add another one from the thing template. From the Edit Menu, select "Check Map". You are told that a number of things have been checked. This means that there were no errors and no things are missing. ═══ 5.9. Saving a PWAD ═══ DEPM allows you to save the current PWAD to disk using the current name, or to save it using a different name. From the File Menu, select "Save PWAD As...". Save this PWAD as "DEPMTEST.WAD". Because you turned off compression, the PWAD will not be saved in compressed form. Note that the Title Bar now indicates that the name of this PWAD is "DEPMTEST.WAD". ═══ 6. Creating a New Map ═══ DEPM allows you to have up to 27 maps in a DOOM PWAD, and 32 maps in a DOOM2 PWAD. From the Edit Menu, select "Close Map". The Editor and Map Windows are dismissed. Again from the Edit Menu, select "New Map...". Select the second radio button and press "OK". A blank map is displayed. When you are creating a new map, the first thing you need to do is add the first sector. Press the Sectors radio button to enter sector mode. ═══ 6.1. Adding a Sector ═══ DEPM allows you to add a sector in sectors mode by dropping it onto the map. This method should be used only for creating sections of the map which are completely disconnected from all other sections, or which are completely enclosed by another sector. As this Tutorial progresses, you will understand why; the optimal method of building a map is to mold and split existing sectors into smaller ones. Zoom in to around 75% and set the grid to 64; all new sectors are 64 x 64 and floor and ceiling textures are aligned on the 64 grid. Position the mouse cursor on the sector template: Press and hold down the right mouse button. The mouse pointer indicates that a sector has been "picked up": Now drag the sector to the middle of the map, and release the mouse button. Note that a sector has been added to the map. ═══ 6.2. Editing a Sector ═══ DEPM allows you to edit the properties of a sector on the map in sectors mode. Move the mouse pointer to the sector you just dropped, and ensure that it turns black and is identified in the Editor Window. Click the left mouse button. The Sector Properties will be displayed. Change the floor texture to COMP01 and the ceiling texture to TLITE6_1. The floor height should be 0 and the ceiling height should be 128. Press OK to save these properties. ═══ 6.3. Deleting a Sector ═══ DEPM allows you to delete a sector from the map in sectors mode. DEPM will "fix up" the map when a sector is deleted. If a sector within a sector is deleted, DEPM will flip the linedefs so that they all have one right side pointing into the correct sector, will set the impassable and clear the two-sided bits for those linedefs, and will copy the upper or lower texture to the normal texture. When you delete a sector within a sector, what is left is an obstacle. To get rid of the obstacle you have to delete the linedefs which define it. ═══ 6.4. Editing a LineDef ═══ DEPM allows you to edit a linedef on a map in linedefs mode. Enter linedefs mode. Move the mouse pointer onto one of the linedefs, and check that the linedef is identified in the Editor Window. Click the left mouse button. The LineDef Properties dialog is displayed. DEPM allows you to edit sidedefs defined for a linedef (or add new ones) from the LineDef Properties dialog. Note the buttons in the "Right Side" and "Left Side" groups. Press the "Abort" button to leave the linedef alone. ═══ 6.5. Drawing a LineDef ═══ DEPM allows you to draw linedefs onto a map in linedefs mode DEPM attempts to make a number of decisions about the linedef when it is drawn. If the linedef bisects a sector, the sector will be split, the linedef will be made two-sided, and the normal texture will be made "-". It is important to know how the sector splitting is done; this will allow you to avoid manually reassigning sidedefs. IMPORTANT: when a linedef is drawn such that it bisects a sector, DEPM assumes that the part of the sector on the LEFT SIDE of the line will be the new sector. It creates a new sector and copies the properties of the old sector, then traverses the linedefs in a clockwise direction starting with the LEFT sidedef of the new linedef, until it returns to the new linedef. ONLY the outside wall is traversed. This means that if you have linedefs disconnected from the outside wall, the sidedefs will remain assigned to the old sector and you will have to either delete them, or manually change the sector assignments. To avoid this, make sure that any sectors on the LEFT SIDE of a new linedef do not contain any sectors or obstacles within them. Move the mouse pointer to the lower right vertex of your square on the map, and check that the vertex is identified. Click the left mouse button. Note that the mouse pointer indicates that a linedef is being drawn: Move the mouse pointer onto the vertex at the upper left corner of the square, and check that the vertex is identified. Click the left mouse button. Note that a new linedef has been drawn. ═══ 6.6. Deleting a LineDef ═══ DEPM allows you to delete linedefs from a map in linedefs mode DEPM attempts to make a number of decisions about the linedef when it is removed. If the linedef divides two sectors, the sectors will be merged, and the sector on the left side of the linedef will be deleted. It is important to know how the sector merging is done; this will allow you to avoid manually reassigning sidedefs. IMPORTANT: When a linedef that divides two sectors is deleted, DEPM assumes that the sector on the LEFT SIDE of the line will be deleted. It traverses the linedefs in a clockwise direction starting with the LEFT sidedef of the deleted linedef, until it returns to the deleted linedef. ONLY the outside wall is traversed. This means that if you have linedefs disconnected from the outside wall, the sidedefs will remain assigned to the old sector and you will have to either delete them, or manually change the sector assignments. To avoid this, make sure that any sectors on the LEFT SIDE of a deleted linedef do not contain any sectors or obstacles within them. Move the mouse pointer to the linedef you just drew, and check that it is identified. Press and hold the right mouse button. Note that the mouse pointer indicates that a linedef has been "picked up": Move the mouse pointer onto the shredder tool and release the mouse button. Note that the linedef has been deleted. ═══ 6.7. Flipping a LineDef ═══ DEPM allows you to "flip" a linedef on the map so that it points the other way. Flip flips the direction of the linedef, and swaps the sidedefs. Swap just swaps the sidedefs. Move the mouse pointer to a linedef, and check that it is identified. Click the right mouse button. Note that the Linedef Flipping Menu is displayed. Push the "Abort" button to leave the linedef alone. ═══ 6.8. Properties Inheritance ═══ In order to save yourself a great deal of work in the future, you can set up DEPM's properties inheritance so that future work inherits the properties you want. This assumes that you know what you want to do before you do it. DEPM's biggest flaw is that it makes editing both fun and easy. Try not to spend hours building maps off the "top of your head" (unless you WANT to). A small amount of time spent in planning what you want to build and thinking about how to use properties inheritance will pay off in saved work and time. To give you practical experience with properties inheritance, the Tutorial will guide you through a short illustration. You have already set up the properties for sectors to inherit (0, COMP01, 128, TLITE6_1, 255, 0, Normal). Now you will set up the properties for sidedefs to inherit. You will then delete your incomplete sector (three of the sidedefs are still STARTAN3 or something), and drop a new sector which inherits the desired properties for all of its sidedefs. Enter linedefs mode. Move the mouse pointer onto one of the linedefs, and check that the linedef is identified in the Editor Window. Click the left mouse button. The LineDef Properties dialog is displayed. Push the "Edit" button in the "Right Side" group. The SideDef Properties dialog is displayed. Set the Normal Texture to GRAY1. Push the OK button to dismiss the SideDef Properties dialog. Push the OK button to dismiss the LineDef Properties dialog. You have set up the properties for all subsequent sidedefs to inherit (until you change it). Enter sectors mode. Move the mouse pointer to the sector you just dropped, and ensure that it turns black and is identified in the Editor Window. Push and hold down the right mouse button. The mouse pointer indicates that a sector has been "picked up". Now drag the sector to the shredder tool, and release the mouse button. Note that the sector has been removed from the map. Drag a new sector from the sector template and drop it onto the map. Edit the sector. Note that the desired properties have been inherited. Dismiss this dialog. Now enter linedefs mode and edit one of the linedefs. Edit the right side. Note that the GRAY1 texture has been inherited. Dismiss these dialogs, but remain in linedefs mode. ═══ 6.9. Cloning a Linedef ═══ Instead of deleting and adding the sector to change all the textures, you could have done it by cloning the appropriate linedef. Move the mouse pointer onto one of the linedefs, and check that the linedef is identified. Now hold down the Ctrl key and click the left mouse button. Note that the mouse pointer indicates that the linedef's properties have been "picked up": Now move the mouse pointer onto another linedef, and hold down the Ctrl key as you click the left mouse button. The properties of the "original" linedef (including its sidedef textures) are copied to the target (they are all the same right now, so you won't notice any change). When you have finished "applying" the original linedef's properties to other linedefs, you can stop cloning by releasing the Ctrl key and clicking the left mouse button. Release the Ctrl key and click the left mouse button. ═══ 6.10. Moving Vertexes ═══ DEPM allows you to move vertexes on a map in linedefs mode. Move the mouse pointer onto the vertex at the upper left, and check that the vertex is identified in the Editor Window. Press and hold the right mouse button. Note that the mouse pointer indicates that a vertex has been "picked up": Drag the vertex to the left two grid lines, then up two grid lines. Release the mouse button. Note that the vertex has moved, and that the linedefs are still connected to it. Move the remaining three vertexes to form a 5 x 5 square: ═══ 6.11. Adding Vertexes ═══ DEPM allows you to split linedefs on a map by adding vertexes in linedefs mode. The additional linedef created by splitting an existing linedef inherits all the properties of the original. Move the mouse pointer onto the vertex at the lower left, and check that the vertex is identified in the Editor Window. Hold the CTRL key down, and press and hold the right mouse button. Note that the mouse pointer indicates that a vertex has been "picked up". Drag the vertex to the right one grid line, and check that the bottom linedef is identified in the Edit Window. Release the mouse button. Note that a new vertex has been added, and the linedef has been split. Now move the mouse pointer onto the vertex template: Press and hold the right mouse button. Note that the mouse pointer indicates that a vertex has been "picked up". Drag the vertex to the bottom linedef, one grid line to the left of the lower right vertex, and check that the linedef is identified in the Editor Window. Release the mouse button, and note that a new vertex has been added, and the linedef has been split. Adding a vertex to a linedef by cloning an existing vertex produces exactly the same results as adding one from the vertex template. ═══ 6.12. Moving Vertexes ═══ DEPM allows you to move vertexes on a map in linedefs mode. Set the Grid to 32. Move the mouse pointer onto the vertex at the lower left, and check that the vertex is identified in the Editor Window. Press and hold the right mouse button. Note that the mouse pointer indicates that a vertex has been "picked up". Drag the vertex to the right one grid line, and release the mouse button. Note that the vertex has been moved. Now move the vertex back to its original location and set the Grid back to 64. ═══ 6.13. Deleting Vertexes ═══ DEPM provides two ways of deleting a vertex from a map in linedefs mode. If you move a vertex onto the shredder tool, it will be deleted; any linedefs connected to that vertex will be deleted as well. This is NOT recommended unless you are certain you want to delete the linedefs. DEPM allows you to move a vertex onto another vertex. This effectively merges the vertexes and removes any linedefs which existed previously between them. This is the recommended way of removing vertexes. ═══ 6.14. Molding a Sector ═══ Assume we want to build a hallway leading south from the room we have built. Also assume we want the hall's wall texture to be COMPBLUE. Remember that a little preparation can save a lot of time. Move the mouse pointer onto the bottom center linedef, and check that the linedef is identified in the Editor Window. Click the left mouse button. The LineDef Properties dialog is displayed. Push the "Edit" button in the "Right Side" group. The SideDef Properties dialog is displayed. Set the Normal Texture to COMPBLUE. Push the OK button to dismiss the SideDef Properties dialog. Push the OK button to dismiss the LineDef Properties dialog. We have now set up the bottom linedef to have the properties we want for the hallway's walls. Drop vertexex on the two grid lines along the middle bottom linedef to split it into three linedefs. Zoom out to about 45%, and scroll your sector to the top of the Map Window. Now drag the leftmost new vertex down five grid lines so that your map looks like this: Move the other vertexes so that your map looks like this: You have just used a technique which I call extrusion; that is, extruding an existing sector to form what will become a new sector. ═══ 6.15. Drawing a Linedef (again) ═══ Assume we want the new hallway to the south to have a lower ceiling than the main room to the north. This means it has to be a different sector. To create a new sector, draw a new linedef which bisects the old sector. IMPORTANT: the sector on the left side of the new line inherits the properties of the sector on the right side. The direction you use while drawing determines the target sector properties! If the left side is the old sector, the new sector will be created with the current inherited properties (from the last sector you "changed"), and the old sector will inherit these properties. If the left side is the new sector, it simply inherits the old sector's properties. Move the mouse pointer onto the vertex at the upper right corner of the new hallway, and check that the vertex is identified. Click the left mouse button. Note that the mouse pointer indicates that a linedef is being drawn: Move the mouse pointer onto the vertex at the upper left corner of the new hallway, and check that the vertex is identified. Click the left mouse button. Note that a new linedef has been drawn, with the right side pointing into the room to the north. Switch to sectors mode, and move the mouse pointer to highlight the "hallway" sector. Press the left mouse button, and change the ceiling height to 72. If you like, change the floor and ceiling textures as well. ═══ 6.16. Editing a Linedef (again) ═══ Switch to linedefs mode, and move the mouse pointer to the linedef you just drew. Note that the linedef is identified, but has no textures. When a new linedef is created, DEPM attempts to make a decision about its properties based on whether it is two-sided or not. Linedefs which split a sector are always created two-sided, and have their normal texture set to "-" (nothing). If the inheritance properties have not been set up with an upper or lower texture, these will not be applied; we did not set up for this linedef because it would not have saved us any work -- we are going to change only one sidedef. The right sidedef of the linedef we just drew requires an upper texture because the ceiling in the sector on the right is higher than the ceiling on the left. Click the left mouse button to bring up the LineDefs Properties dialog. Push the "Edit" button in the "Right Side" group. The SideDef Properties dialog is displayed. Set the Upper Texture to GRAY1. Don't dismiss this dialog yet. When you want textures to align properly above windows, above doorways, or in pits, you may have to offset the texture using the texture offset property of the sidedef. In this case, if we do not offset the texture, it will be rendered from the bottom 72 units above the floor and will not match the textures on the surrounding walls, which are rendered from the bottom 0 units above the floor. Set the Y Offset to -72; this shifts the texture down 72 units so that it is rendered from 72, 72 units above the floor to match the neighbouring walls. Push the OK button to dismiss the SideDef Properties dialog. Push the OK button to dismiss the LineDef Properties dialog. ═══ 6.17. Saving the PWAD (again) ═══ Switch to things mode and add four "Player Start" things in the north room. Using the File Menu, select "Save PWAD". The PWAD is saved to "DEPMTEST.WAD". This would be a good time to examine your work. From the Edit Menu, select "Close Map" to dismiss the Editor and Map Windows. Minimize the application, and start up DOOM with the "-file depmtest.wad -warp 1 2" parameters ("-file depmtest.wad -warp 2" for DOOM2). ═══ 7. Putting a Map Together ═══ The components which make up a map can be put together in so many different ways that it would be pointless for this tutorial to attempt to explain them all (besides, good maps always contain some original ideas which make them "unique"). You will be shown how to build some very basic map components: a door, a lift, stairs, stairs that rise, a secret door, and a teleporter. If you have not done so already, start DEPM and use the File Menu to Open "DEPMTEST.WAD". Now edit map 2, which is the map you are working on. ═══ 7.1. Building a Door ═══ A door is a sector in which the floor height and the ceiling height are the same. The neighbouring sectors determine how high the ceiling will rise when the door is opened. For doors, the floor height should be the same as the neighbour's floor height. I usually recess doors in short hallways so that I can have the textures match properly. Position the junction between the room and the hallway in the center of the map, and zoom in to around 100%. Set your grid to 16, and enter linedefs mode. Zoom in to around 75%. Drop vertexes along the hallway: Now draw a linedef from vertex 1 to vertex 2. This is one side of the door. Edit this linedef and set its right upper texture to "DOOR1". Change the Y Offset to 0 (it will be -72 because the last sidedef you saved had a Y Offset of -72). Change its type to "Door - SR stays open for 6 seconds". Draw another linedef from vertex 3 to vertex 4; this linedef inherits the "DOOR1" texture on both sides, but you don't care because nobody ever sees the left side. Edit this linedef to set its type to "Door - SR stays open for 6 seconds". Change the right normal textures of the sides of the door to "DOORTRAK" and set the "Lower texture unpegged" flag. This prevents the door tracks from moving up when the door is opened. You should now have something that looks like this: Now go into sectors mode, and set the floor and ceiling heights of the door to be 0 and 0; change the floor and ceiling textures to "FLAT23" to give the door a nice metallic look on the bottom. You now have a functioning and "correct-looking" door on your map. If you want to polish the appearance up a bit more, note that the linedefs to the north of the door in the short hallway have a "COMPBLUE" texture but are part of the room itself. Change the right normal texture of the two "COMPBLUE" walls to "GRAY1" and set the Y Offset to -72 (this will cause the textures to line up with the other walls). ═══ 7.2. Building a Lift ═══ Assume you want the hallway to end with a lift which takes the player up to another hallway whose floor height is 128 and ceiling height is 256. First you will create the other hallway, with a wall texture of "ICKWALL1". Change the right normal texture of the southmost wall of the hallway to "ICKWALL1". With the grid at 32, drop a vertex in the middle of the southmost wall, then drag it down 12 grid lines. Drop another vertex on one of the linedefs "stretched" by moving the vertex. Now move the vertexes so that a hallway is formed: Now draw a linedef from vertex 1 to vertex 2 to create a new sector. Because this new sector will have a floor height of 128 and a ceiling height of 256, the new linedef needs a left upper texture and a right lower texture. Edit this linedef and set the left upper texture to "ICKWALL1" with a Y Offset of -72; then set the right lower texture to "SUPPORT2" with a Y Offset of 0. You did the "SUPPORT2" texture last because you want it to be the inherited property for a future linedef. Now set the sector properties for the new sector. Go into sector mode and edit the new hallway. Set the floor height to 128 and the ceiling height to 256. If you like, change the floor and ceiling textures as well. Now return to linedefs mode. Now, create a lift. Drop a vertex on both walls two grid lines south of the new linedef: Now draw a linedef from vertex 1 to vertex 2. This linedef inherits the "SUPPORT2" lower right texture, so you don't have to change it. Both of these lines should lower the lift, so edit both linedefs; set the one on the north to "Floor - TSR lowers for 3 seconds", and the one on the south to "Floor - TWR lowers quickly for 3 seconds". Set the sector tags to "1". Now go into sectors mode and set the sector tag of the "lift" to "1". If you like, set the floor texture to "STEP2". You now have a functioning lift on your map. ═══ 7.3. Building Stairs ═══ Let's assume that you want to create a set of stairs leading east at the south end of the hallway. Zoom in to around 80% and move your south hallway to the left side of your Map Window. Set the grid to 32. Drop a vertex on the rightmost linedef, two grid lines up from the bottom right vertex (this creates a linedef which you will change and then extrude to form the stair sector). Change the linedef's right texture to "METAL1". Now drop a vertex in the middle of the new linedef (one grid line up from the bottom right vertex), and drag it right 12 grid lines and up one grid line. Now drop a new vertex on the stretched linedef and straighten out your new hallway to look like this: Now separate the hallway into a new sector by drawing a linedef from vertex 1 to vertex 2. Now go into sectors mode and change the new sector's floor texture to "STEP1" and the ceiling texture to "TLITE6_6". Return to linedefs mode and edit the linedef you just drew. Set the lower texure to "STEPTOP" and the upper texture to "METAL" for both sidedefs -- this will set up the properties for future drawn linedefs to inherit. Remember, unnecessary textures do not affect the level's appearance; missing textures DO. Although you will need a RL and LU texture, having RL, RU, LL and LU textures will not hurt anything. You want your future linedefs to have RL, RU, LL and LU textures matching those you just set up. Assuming you want seven steps and a landing at the top, drop seven vertexes along the upper and lower linedefs of the new hallway: Now draw linedefs connecting vertexes 1 and 2, 3 and 4, 5 and 6, 7 and 8, 9 and 10, 11 and 12, and 13 and 14. These are your steps. Now go into sectors mode. Starting at the leftmost step, set the floor and ceiling heights of the sectors to 144, 272; 160, 288; 176, 304; 192, 320; 208, 336; 224, 352; 240, 368; and 256, 384. The last sector is the landing, so set the floor texture to "FLOOR4_8". You now have a set of stairs on your map. ═══ 7.4. Building Rising Stairs ═══ Rising stairs are just like normal stairs except that their floors start out at the same height. The "stair-raiser daemon" starts with the sector you give a sector tag to, and looks for a right sidedef in that sector. It checks that the sector on the other side of the linedef has a sector tag of 0, and looks for a right sidedef in that sector. It then checks that the sector on the other side of the linedef is tagged, and so on. An even number of stairs will be raised, starting with the tagged sector and alternating between untagged and tagged sectors. The tag for the other sectors is not important -- id Software uses the tag used by the trigger linedef for the first sector, then alternates between 0 and 999 for the remaining sectors. The floors are raised in multiples of 8 units (8, 16, 24, 32, and so on), or in multiples of 16 units, depending on the linedef type which triggers them. Let's assume that you want to create a set of rising stairs leading south at the south end of the hallway. Zoom in to around 80% and move your south hallway to the top middle of the Map Window. Set the grid to 32. Change the bottom linedef's right texture to "SHAWN2". Now drop a vertex in the middle of the bottom linedef, and drag it down 12 grid lines. Now drop a new vertex on the stretched linedef and straighten out your new hallway to look like this: Now separate the hallway into a new sector by drawing a linedef from vertex 1 to vertex 2. Now go into sectors mode and change the new sector's floor texture to "STEP2" and the ceiling texture to "TLITE6_5". Change the ceiling height to 320. Return to linedefs mode and edit the linedef you just drew. Set the lower texure to "STEP3" and the upper texture to "SHAWN2" for both sidedefs -- this will set up the properties for future drawn linedefs to inherit. Assuming you want eight steps with a landing at the top, drop eight vertexes along the left and right linedefs of the new hallway: Now draw linedefs connecting vertexes 1 and 2, 3 and 4, 5 and 6, 7 and 8, 9 and 10, 11 and 12, 13 and 14, and 15 and 16. These are your steps. Now go into sectors mode. The last sector is the landing, so set the floor texture to "FLOOR4_6" and the floor height to 192. Now you have to make it work. Set the tag of the northmost stair to "2". Leave the tag of the sector to the south of it (the second stair) as "0". Now set the tag of every odd stair (stairs 3, 5 and 7) to "999" (you will have to do this for three sectors). Now you need something to trigger it, so switch to linedefs mode and change the linedef at the end of the normal stairway (up on the landing built in the previous section) to have a sector tag of "2" and to be of type "Stairs - TS1 8 high, rise from floor alternately between tagged and untagged sectors". Give it a right normal texture of "SW1METAL". If you apply a texture that is "too short" to a wall, you will get the "tutti frutti" effect. If you would like a prime example of this, build and save your PWAD and try it out. Look at the landing of the raising stairs we just built. To fix the "tutti frutti" effect, change the right lower texture of the landing to "SUPPORT3". You now have working stairs that raise from the floor. ═══ 7.5. Building a Secret Door ═══ Let's assume that you want to create a secret door into a room to the west of the normal stairway. You will use a wall texture of "MARBLE1" for this room. Zoom in to around 80% and move your normal stairway to the right side of the Map Window. Set the grid to 32. Drop a vertex on the left linedef of the hallway, even with the topmost vertex of the normal stairway. Change the normal texture of the new linedef created to "MARBLE1" and save it. Now add a vertex in the center of the new linedef, and extrude it to the left. Add and move vertexes to form a room: Now build a door at the room's entrance, using upper textures of "ICKWALL1" on the right linedef and "MARBLE1" on the left linedef. Set the Y Offset to 1 or 2 for these textures. It is considered polite to offset textures slightly for secret doors. Change the linedef types to "Door - SR stays open for 6 seconds" and check the "Secret" checkbox. This causes the door to look like a normal wall on the automap. Remember to set the door tracks to be "DOORTRAK" with "lower texture unpegged" checked. You should end up with something that looks like this: Set the door sector's floor and ceiling height to 128 (the height of the hallway's floor), and change the floor and ceiling textures to "FLAT23". Now change the secret room itself: set the effect type to "secret". If you like, change the light level and the floor and ceiling textures. You now have a secret room on your map. ═══ 7.6. Building a Teleporter ═══ Let's assume that you want to create a teleporter at the top of the rising stairs, which takes the player to a room totally disconnected from the rest of the map. Edit one of the sidedefs in the secret room, and push the OK button so that you set up your default properties for sidedefs to be "MARBLE1". Now set the grid to 64, and drop in a new sector like this: Move the vertexes to form a room that looks like this: The walls will be "MARBLE1" because that is the last sidedef you saved. Drop in another sector, for a teleporter: Set the floor and ceiling textures to "GATE1". Give this new sector a sector tag of "3". Set the effect to "Normal"; it will be "secret" from the last sector you saved. Assume this is a teleporter landing that you can use to go back to the original teleporter. You will use a sector tag of "4" for that sector. Set the linedefs defining the teleporter landing to be of type "Special - TWR teleport to sector" and set the sector tags to "4". Teleporters work as the player crosses from the right sidedef to the left sidedef. Note that the right sidedefs face into the teleporter landing. This means that as the player tries to step out of the teleporter, s/he will be sent back to the original teleporter. Flip all the linedefs defining the teleporter landing sector: Assume we want the original teleporter to be at the top of the rising stairs. Drop vertexes and draw a linedef: Note that a new sector has been created at the end of the rising stairs. Set the floor and ceiling textures of the bottom sector at the end of the rising stairs to "GATE1", and set the sector tag to "4". This will be your other teleporter landing. Note that only one linedef is two-sided in this sector. Set it to "Special - TWR teleport to sector" and set the sector tag to "3". A teleporter linedef sends the player to a "Teleport Exit" thing in the tagged sector. You can have only one "Teleport Exit" thing in a sector. Set the grid to 32, and add two teleport exits on the teleporters: You now have a working teleporter on your map. ═══ 7.7. Checking the Map ═══ Go into sectors mode and check the map. DEPM will tell you that 28 sectors have been checked. Now go into linedefs mode and check the map. DEPM tells you that there is no END LEVEL linedef. Push the OK button. DEPM tells you how many linedefs and sidedefs it checked. Assume you want to put in an END LEVEL linedef. Set the grid to 64, and drop two vertexes along the bottom wall of the separate sector: Edit one of the linedefs to give it a texture of "SW1MARB" and set it to type "End Level - S1 end level and go to next level". Check the map again. It will tell you that it has checked 94 linedefs and 123 sidedefs. Go into things mode and wait for the node builder to complete. Save your PWAD. This would be a good time to examine your work. From the Edit Menu, select "Close Map" to dismiss the Editor and Map Windows. Minimize the application, and start up DOOM with the "-file depmtest.wad -warp 1 2" parameters ("-file depmtest.wad -warp 2" for DOOM2). ═══ 7.8. Go Play! ═══ This is the end of the tutorial. Feel free to experiment with your PWAD by adding monsters and weaponry in things mode. Note that if you check your map in things mode, it will tell you that there are less than 4 deathmatch starts. Your map (map 2) is now a duplicate of map 1, which is the map you first looked at in this tutorial.